1. Field of the Invention
The present invention relates generally to a storage data management technique and, more particularly, to, a technique for managing data in storage implemented with nonvolatile memory devices.
2. Description of the Related Art
Recently, as technology for nonvolatile memory (NVRAM), such as phase change memory (PCM) and spin torque transfer magnetic RAM (STT-MRAM) have been rapidly developed, it is expected that NVRAM will be used as main memory, replacing dynamic RAM (DRAM) in the near future. In some cases, NVRAM may exhibit better characteristics than DRAM in various aspects, such as performance, the level of integration, power consumption, etc.
The advent of nonvolatile main memory is expected to significantly affect the conventional hierarchy storage management mechanisms equipped with volatile main memory. Furthermore, it is expected that a system with a main memory, a buffer cache and a storage implemented with nonvolatile memory will be introduced in the near future.
Since a buffer cache in a conventional system is provided by RAM, which is a volatile medium, the buffer cache is used to temporarily store data for instant access to the data. In contrast, if a buffer cache is implemented with a nonvolatile medium, the buffer cache, though being conventionally a temporary storage, can semi-permanently store data, like a mass storage, which is a semi-permanent data storage.
Meanwhile, a flash memory incessantly performs write operations by itself, for example without data updates, due to supplementary management tasks, such as garbage collection (GC), unique to a nonvolatile storage device, while a hard disk drive may store data, once having been written, at the same location semi-permanently unless an exceptional situation.
In a nonvolatile mass storage device in which a write operation is relatively slow, its performance and lifespan are reduced because of overhead, such as a management task, and thus it requires high cost to maintain data.
Accordingly, in this context, there is a need for a storage management technique capable of managing a buffer cache and a mass storage in an integrated manner and increasing their performance and lifespan in an environment where nonvolatile storage media are used as the buffer cache and the mass storage.
Meanwhile, a conventional method for dealing with a system failure of a file system is a method for conducting an integrity check of a file system in the case of, for example, Linux, using a predetermined utility, such as fsck, upon booting, during which the file system is examined, and if an error is found, the error is automatically fixed by the utility, or the system will be reboot in recovery mode so that a user can manually recover the system.
Depending on the version of an OS, a utility, such as fsck, may be always run upon mounting, in order to check the consistency of the metadata of a file system. Accordingly, in the case of the conventional method, a file system must be always inspected because it is unlikely to know when problems will occur in the file system, and further the massive file system must be sequentially investigated because it is unlikely to know where problems will be found.
A journaling technique, having been proposed to overcome the above disadvantages, is a technique that records changes in a journal before recording them in a file system and manages metadata about the changes as a log. The journaling technique can recover a file system with high reliability and speed in case of an abnormal termination of the file system, and improves disk performance utilizing a relatively faster journal, instead of a slower disk, during normal operations.
The metadata of a file system is secondary data for structure management that is used to manage data stored in a disk in a structural manner. The metadata of a file system is created for creating or deleting a file, making or erasing a directory, increasing or decreasing the size of a file, or the like. In other words, the metadata of a file system is information about changes to be reflected in the file system.
A file system employing a journaling technique is referred to as a journaling file system. Journaling file systems are commonly designed to record changes or both of changes and their metadata in a dedicated journal area and to record up-to-date changes upon the location of an authentic original version in storage at a predetermined point in time, which is referred to as a checkpoint operation.
For a write operation in the journal area, the file system manages a series of updates, which must be consistently reflected on a transaction basis, and performs a commit operation for guaranteeing that all data belonging to a transaction are to be successfully recorded in the journal area, normally in a cycle of a few minutes.
Journaling file systems have been developed to have somewhat different detailed policies depending on their developers. For example, depending on the policies, changes may be stored at the location of an authentic original version in storage and then their metadata may be recorded in a journal area, or both of metadata and changes may be recorded in a journal and then the changes may be again recorded at the location of an authentic original version in storage. Furthermore, depending on the policies, a journal may be checkpointed when the remaining space turns out to be insufficient, or a journal may be checkpointed when a predetermined time comes.
The journal area of a journaling file system may be implemented as a partial space of nonvolatile storage because the stored journal must be maintained when and after a system failure occurs.
While a system having no journaling feature transfers updated data from main memory to a storage device to be recorded at the very moment when replacement must be performed because of insufficient space in a cache, a system with journaling feature frequently generates a commit operation in a cycle of a few minutes even in order to reduce the vulnerability of a system, causing considerable storage traffic. As a result, a significant reduction in performance may occur in a hard disk and a cloud storage demanding expensive access cost, and also considerable reductions in performance and durability may occur in a flash memory based environment in which limited numbers of write operations at low speed are allowed.
Although there is a consensus that cloud storage systems, recently attracting attention, may require journaling file systems, a journaling file system is not easily applied to cloud storage systems because the network access cost increases due to journaling.
Meanwhile, although the above problem seems to be easily overcome by just constructing a nonvolatile buffer cache and a nonvolatile memory capable of random access in read and write operations, such as PCM or STT-MRAM, as main memory, this is not true in practice.
In journaling file systems, reliability can be achieved not only by maintaining data when power turns off, but also by guaranteeing the consistency of data during power failure followed by reconnecting to power and rebooting.
For example, a change to data in a buffer cache and a change to corresponding metadata must happen concurrently. If a system crashes just after data has been updated in a nonvolatile buffer cache, the metadata is not consistent with up-to-date changed data even when the up-to-date changed data remains in the nonvolatile buffer cache after rebooting has been performed. Accordingly, if the changed data is reflected at the location of an authentic original version in storage, the consistency of a file system is corrupted.